package com.ybkj.chat.module.main.fragment;

import android.view.View;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.ybkj.chat.R;
import com.ybkj.chat.base.BaseMvpFragment;
import com.ybkj.chat.manager.ActivityManager;
import com.ybkj.chat.module.dynamic.activity.DynamicDetailActivity;
import com.ybkj.chat.module.dynamic.adapter.DynamicAdapter;
import com.ybkj.chat.ui.view.recyclerview.XRecyclerView;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 动态
 */
public class DynamicFragment extends BaseMvpFragment {

    @BindView(R.id.message_add)
    ImageView messageAdd;
    @BindView(R.id.irc)
    XRecyclerView irc;

    private DynamicAdapter mDynamicAdapter;

    @Override
    protected void injectPresenter() {

    }

    @Override
    protected void initView() {
        initrecycle();
    }

    @Override
    protected void initData() {

    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_dynamic;
    }

    @Override
    protected String getSimpleNme() {
        return null;
    }

    private void initrecycle() {
        mDynamicAdapter = new DynamicAdapter(mContext);
        mDynamicAdapter.addData("1");
        mDynamicAdapter.addData("1");
        mDynamicAdapter.addData("1");
        mDynamicAdapter.addData("1");
        mDynamicAdapter.addData("1");
        irc.setAdapter(mDynamicAdapter);
        mDynamicAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
            @Override
            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
                ActivityManager.gotoActivity(mContext, DynamicDetailActivity.class);
            }
        });
    }


    @OnClick({R.id.message_add})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.message_add:
                break;
        }
    }

}
